package com.sunwayhorizo.health.business.patad.empi.query;

import java.util.*;

import javax.ejb.*;
import com.sunwayhorizo.health.business.base.query.BaseQueryLocal;
import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.rim.Patient;
import com.sunwayhorizo.health.hl7.rim.Role;

@Local
public interface PatientQueryLocal extends BaseQueryLocal
{
    /**
     * 查询患者
     * 
     * @Title: findPatientByEnetityId
     * @param id
     *            患者实体id
     * @return Patient 患者
     * @throws Hl7Exception
     * @firstAuthor Obama
     * @firstTime 2011-03-21 16:30:15
     * @lastAuthor Obama
     * @lastTime 2011-03-21 16:30:15
     */
    // Patient findPatientByEnetityId(long id)throws Hl7Exception;
    /**
     * 查询患者
     * 
     * @Title: findPatientByRoleId
     * @param id
     *            角色id
     * 
     * @return Patient 患者
     * @throws Hl7Exception
     * @firstAuthor Obama
     * @firstTime 2011-03-21 16:30:15
     * @lastAuthor Obama
     * @lastTime 2011-03-21 16:30:15
     */
    // Patient findPatientByRoleId(long id) throws Hl7Exception;

    /**
     * 查询RimCoreRoleIi
     * 
     * @Title: findRimCoreRoleIiByNeturalId
     * @param 患者id
     * 
     * @return List<RimCoreRoleIi>
     * @throws Hl7Exception
     * @firstAuthor Obama
     * @firstTime 2011-03-21 16:30:15
     * @lastAuthor Obama
     * @lastTime 2011-03-21 16:30:15
     */
    // List<RimCoreRoleIi> findRimCoreRoleIiByNeturalId(String id) throws
    // Hl7Exception;

    /**
     * 查询患者
     * 
     * @Title: findPatientByNeturalId
     * @param 患者id
     * 
     * @return Patient 患者
     * @throws Hl7Exception
     * @firstAuthor Obama
     * @firstTime 2011-03-21 16:30:15
     * @lastAuthor Obama
     * @lastTime 2011-03-21 16:30:15
     */
    Patient findPatientByNeturalId(String id) throws Hl7Exception;


    List<Patient> findPatientByConditions(String id, String patName, String certificate, String address, int pageSize, int pageNo) throws Hl7Exception;


    long findCountPatientByConditions(String id, String patName, String certificate, String address) throws Hl7Exception;


    Patient findPatientByMedicalCardId(String medicalCardId) throws Hl7Exception;


    long baseCountPatientQuery(Map<String, Map<String, Object>> conditions) throws Hl7Exception;


    List<Patient> basePatientQuery(Map<String, Map<String, Object>> conditions, int pageNo, int pageSize) throws Hl7Exception;


    List<Patient> findPateintsIndepartment(long workgroupId, int pageNo, int pageSize) throws Hl7Exception;


    Role findFamilyRole(String roleId);

    // Patient findPatient(String roleId);

}
